/*
 * Copyright (C) 2013 TopCoder Inc., All Rights Reserved.
 */
package cn.itcast.eclipse;

import org.junit.Test;

public class Demo2 {

	@Test
	public void testSum() {
		sum(1, 2, 3, 4);
	}
	
	public void sum(int ...nums) {
		int sum = 0;
		for(int i : nums) {
			sum += i;
		}
		System.out.println(sum);
	}
}
